Skip to content

feat: implement stellar-quickstart-up runtime installer#9282

Open
ulissesferreira wants to merge 7 commits into
mainfrom
add-stellar-quickstart-up-package-impl
Open

feat: implement stellar-quickstart-up runtime installer#9282
ulissesferreira wants to merge 7 commits into
mainfrom
add-stellar-quickstart-up-package-impl

Conversation

@ulissesferreira

@ulissesferreira ulissesferreira commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Explanation

Extension E2E tests need local node bootstrap installers for each non-EVM chain, following the same runtime-only pattern as @metamask/foundryup. MetaMask/core already ships several *-up packages that install pinned runtimes into the MetaMask cache and expose binaries in node_modules/.bin, while the consuming test harness owns process startup, readiness checks, and seeding:

Package Chain Runtime
@metamask/bitcoin-regtest-up (#9212) Bitcoin Bitcoin Core bitcoind / bitcoin-cli
@metamask/solana-test-validator-up (#9210) Solana Agave solana-test-validator / solana CLI
@metamask/java-tron-up (#9211) Tron java-tron FullNode.jar + managed JDK
@metamask/stellar-quickstart-up (this PR) Stellar stellar/quickstart Docker image

This PR completes the Stellar installer. The package scaffold landed in #9281; this change adds the implementation.

Stellar Quickstart runs as a Docker image rather than a downloaded native binary, so the installer pulls a digest-pinned stellar/quickstart image, caches metadata under the MetaMask cache namespace, resolves docker on PATH, and writes a stellar-quickstart wrapper that runs docker run --rm -i -p 8000:8000. Container lifecycle and seeding remain in the Extension harness.

Shared installer utilities come from @metamask/local-node-utils.

References

  • Scaffold: #9281
  • Jira Epic: WPN-1509 — [Extension] Expand Stellar's E2E test coverage
  • Jira Task: WPN-1510 — Create Stellar Quickstart installer package stellar-quickstart-up

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Verification

yarn workspace @metamask/stellar-quickstart-up run build
yarn workspace @metamask/stellar-quickstart-up run test
yarn eslint packages/stellar-quickstart-up
yarn constraints
yarn workspace @metamask/stellar-quickstart-up run changelog:validate

Test plan

  • yarn workspace @metamask/stellar-quickstart-up run build
  • yarn workspace @metamask/stellar-quickstart-up run test
  • yarn eslint packages/stellar-quickstart-up
  • yarn constraints
  • yarn workspace @metamask/stellar-quickstart-up run changelog:validate
  • Manual: yarn stellar-quickstart-up install with Docker available, then node_modules/.bin/stellar-quickstart --local

Note

Low Risk
New dev/CI tooling package with no production wallet or auth paths; behavior is covered by unit tests and digest verification on pull.

Overview
Implements @metamask/stellar-quickstart-up as a runtime-only installer (same model as @metamask/foundryup and other *-up packages) for Extension E2E Stellar local nodes.

The package pulls a digest-pinned stellar/quickstart:latest image, verifies it via docker image inspect, caches metadata under the MetaMask cache (with Yarn global-cache behavior from @metamask/local-node-utils), and installs a stellar-quickstart wrapper in node_modules/.bin that runs docker with default -p 8000:8000 and forwards args (e.g. --local). A stellar-quickstart-up CLI handles default install, cache clean, and config from package.json / CLI flags. Container startup and seeding stay in the test harness.

Replaces the scaffold greeter with install.ts exports and tests; wires local-node-utils, bin, changelog/README, monorepo README dependency graph, and relaxed Jest coverage thresholds (CLI entry excluded).

Reviewed by Cursor Bugbot for commit a7eb2f5. Bugbot is set up for automated code reviews on this repo. Configure here.

@ulissesferreira ulissesferreira requested review from a team as code owners June 26, 2026 11:50
Comment thread packages/stellar-quickstart-up/src/install.ts
Comment thread packages/stellar-quickstart-up/src/install.ts Outdated
Comment thread packages/stellar-quickstart-up/src/install.ts Fixed
@ulissesferreira ulissesferreira force-pushed the add-stellar-quickstart-up-package-scaffold branch from e2a9c44 to bafa112 Compare June 29, 2026 09:09
An error occurred while trying to automatically change base from add-stellar-quickstart-up-package-scaffold to main June 29, 2026 09:31
@ulissesferreira ulissesferreira force-pushed the add-stellar-quickstart-up-package-impl branch from 1793243 to 49a33c7 Compare June 29, 2026 15:08
@ulissesferreira ulissesferreira requested review from a team as code owners June 29, 2026 15:08
@ulissesferreira ulissesferreira changed the base branch from add-stellar-quickstart-up-package-scaffold to main June 29, 2026 15:08

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1454131. Configure here.

digest: readFileSync(digestPath, 'utf8'),
imageReference: image.reference,
};
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metadata cache skips Docker verify

High Severity

On a cache hit, installStellarQuickstartImage returns after matching on-disk metadata only and skips docker pull and digest inspection. If the local image was removed (for example after docker system prune) while cache files remain, install still reports success and the stellar/quickstart:latest wrapper may pull or run an image that was never checked against the pinned digest.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1454131. Configure here.

Comment thread packages/stellar-quickstart-up/src/bin/stellar-quickstart-up.ts
Add the Docker-backed Stellar Quickstart installer that pulls a pinned
stellar/quickstart image and exposes a node_modules/.bin wrapper for E2E
harnesses to start local Stellar nodes.
… main

Resolve Docker via PATH before writing the wrapper, verify image digests
using RepoDigests instead of image Id, and expand the README to match
other *-up packages.
…details

Document the default docker run invocation, RepoDigest verification,
Quickstart service endpoints, and package.json config fields.
Match the other *-up packages so changelog and release checks pass
before the first publish.
Wire stellar-quickstart-up -> local-node-utils in the root README dependency
diagram and apply oxfmt to the installer sources.
@ulissesferreira ulissesferreira force-pushed the add-stellar-quickstart-up-package-impl branch from ca8541d to 8f37a91 Compare June 29, 2026 15:54
…adata

Read cached digest/reference files in a try/catch instead of existsSync
followed by readFileSync to satisfy CodeQL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants